import { mapMutations } from 'vuex'
export default{
    methods:{
        ...mapMutations('app',['SET_COLLAPSE']),
        $_resize(){
          const WIDTH=600
          let bodyW=document.body.clientWidth
          if(bodyW>WIDTH){
            this.SET_COLLAPSE(false)
          }else{
            this.SET_COLLAPSE(true)
          }
    
        }
      },
      mounted(){
        this.$_resize()
        window.addEventListener('resize',this.$_resize)
    
      },
      beforeDestroy(){
        window.removeEventListener('resize',this.$_resize)
      }
}